/*
 * Filename : AverageNode.java
 * Description : **COMPLETE**
 * History  : Date               Engineer       Description
 *            ---------          ------------   --------------------------------
 *            September 18, 2007      waitek         Initial creation.
 */

package com.lct.eq2.data;

import java.util.ArrayList;

public class AverageNode {
    private int type;
    private ArrayList attackHashMapList;
    private Duration encounterDuration;
    
    /** Creates a new instance of AverageNode */
    public AverageNode(int type, Duration encounterDuration) {
        attackHashMapList = new ArrayList();
        this.type = type;
        this.encounterDuration = encounterDuration;
    }
    
    public void addToAttackHashList(AttackHashMap map) {
        this.attackHashMapList.add(map);
    }
    
    public ArrayList getAttackHashMaps() {
        return this.attackHashMapList;
    }
    
    public Duration getDuration() {
        return this.encounterDuration;
    }
    
    public int getType() {
        return this.type;
    }
    
    public String toString() {
        String rval = null;
        switch(this.type) {
            case Attack.ATTACK_TYPE_MELEE:
                rval = "Melee";
                break;
            case Attack.ATTACK_TYPE_NON_MELEE:
                rval = "Non-Melee";
                break;
            case Attack.ATTACK_TYPE_NON_MELEE_HEALING:
                rval = "Healing";
                break;
            case Attack.ATTACK_TYPE_UNKNOWN:
                rval = "Unknown Type";
                break;
            case Attack.ATTACK_TYPE_INCOMING:
                rval = "Total Incoming Damage";
                break;
            case Attack.ATTACK_TYPE_OUTGOING:
                rval = "Total Outgoing Damage";
                break;
            default:
                break;
        }
        return rval;
    }
}
